﻿/*
 * zdouble_unittest.cxx
 *
 *  Created on: 2015年3月4日
 *      Author: Fifi Lyu
 */

#include <gtest/gtest.h>
#include "zpsoe/zalgorithm/zdouble.h"

using namespace zpsoe::zalgorithm;

TEST(ZdoubleTest, round) {
    // int64_t 边界值
    // round 中使用了int64_t
    const double d_ = 10000000000000000.89443;
    const double expected_ = zdouble::round(d_, 2);
    const double actual_ = 10000000000000000.89;
    EXPECT_DOUBLE_EQ(actual_, expected_);
}
